package cn.edu.lnpu.api.cource;

import cn.edu.lnpu.common.model.response.QueryResponseResult;
import cn.edu.lnpu.common.model.response.ResponseResult;
import cn.edu.lnpu.domain.course.CourseBase;
import cn.edu.lnpu.domain.course.CoursePic;
import cn.edu.lnpu.domain.course.Teachplan;
import cn.edu.lnpu.domain.course.TeachplanMedia;
import cn.edu.lnpu.domain.course.ext.CourseView;
import cn.edu.lnpu.domain.course.ext.TeachplanNode;
import cn.edu.lnpu.domain.course.response.CoursePublishResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;

@Api(value="课程管理接口",description = "课程管理接口，提供数课程的管理、查询接口")
public interface CourseControllerApi {

    @ApiOperation("查询课程列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name="page",value = "当前页",required=true,paramType="path"),
            @ApiImplicitParam(name="size",value = "页面大小",required=true,paramType="path")
    })
    QueryResponseResult<CourseBase> courseBaseList(int page, int size);

    @ApiOperation("根据课程ID查询课程信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name="courseId",value = "课程ID",required=true,paramType="path")
    })
    CourseBase getCoursebaseById(String courseId);

    @ApiOperation("根据课程ID查询教师教学计划列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name="courseId",value = "课程ID",required=true,paramType="path")
    })
    TeachplanNode findTeachplanList(String courseId);

    @ApiOperation("添加课程计划")
    ResponseResult addTeachplan(Teachplan teachplan);

    public ResponseResult addCoursePic(String courseId,String pic);

    @ApiOperation("查询课程图片")
    public CoursePic findCoursePic(String courseId);

    @ApiOperation("删除课程图片")
    public ResponseResult deleteCoursePic(String courseId);

    @ApiOperation("课程视图查询")
    public CourseView courseview(String id);

    @ApiOperation("课程预览")
    public CoursePublishResult preview(String id);

    @ApiOperation("课程发布")
    public CoursePublishResult publish(String id);

    @ApiOperation("保存课程计划与媒资文件关联")
    public ResponseResult savemedia(TeachplanMedia teachplanMedia);

}
